package com.itheima.common;

import com.itheima.entity.User;
import org.springframework.stereotype.Component;

/**
 * Created by jinkun.tian on 2023/12/4
 */
@Component
public class KeyGenerator {
    public String generate(User user) {
        // 实现根据 User 对象生成 key 的逻辑
        return user.getId() + "-" + user.getName();
    }
}
